Conventionally, an inverter circuit for converting direct current to alternating current includes a semiconductor device in which an IGBT operating as a switching element and a free wheel diode (FWD) are integrated in the same chip, as described, for example, in JP-A-2007-227806 (corresponding to US 2007/200138 A). The semiconductor device converts direct current to alternating current by turning on and off the IGBT. When the IGBT is turned off, electric current that flows to a load (e.g., a motor) through the FWD flows back.